package com.apidoc.conf;

import com.apidoc.ApiDocController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
@ConditionalOnClass(ApiDocController.class)
//@EnableConfigurationProperties(ExampleServiceProperties.class)
public class ApiDocAutoConfiguration {

    @Autowired
    private ApiDocController apiDocController;

    @Bean
    @ConditionalOnMissingBean
//    @ConditionalOnProperty(prefix="calculate",value="enabled",havingValue="true")
    public ApiDocController apiDocController() {
        return apiDocController;
    }


}
